const Koa = require('koa');
const app = new Koa();

const Router = require('koa-router');
const router = new Router();
var bodyParser = require('koa-bodyparser');
app.use(bodyParser());
 



// 启动路由
app.use(router.routes()).use(router.allowedMethods())


router.post('/gif', async ctx => {
    console.log(ctx.request.body);
    
    ctx.body = 'Hello Router';
})

router.get('/list', async ctx => {
    ctx.body = 'Hello Router';
})


app.listen(3001);